/**
 * 解决安装Nuxt3报错
 * 
 * Error: Failed to download template from registry: fetch failed
 * @see [issues](https://github.com/nuxt/nuxt/issues/21853)
 * 
 * 运行报错
 * node -e "require('https').get('https://raw.githubusercontent.com/nuxt/starter/templates/templates/v3.json')"
 * 直接运行就行了
 * 
 * 学习一个知识点 node -e 直接执行一段js脚本
 */


// require('https').get('https://raw.githubusercontent.com/nuxt/starter/templates/templates/v3.json')
/**
 * 因为
 * ReferenceError: require is not defined in ES module scope, you can use import instead
 * This file is being treated as an ES module because it has a '.js' file extension and 'E:\workspace-self\fly-roc\package.json' contains "type": "module".
 * To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
 * 所以使用import导入
 */
import https from 'https'
https.get('https://raw.githubusercontent.com/nuxt/starter/templates/templates/v3.json')